]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
remove direct access to jsapi
authorTim Lunn <tim@feathertop.org>
Tue, 29 Oct 2013 07:12:10 +0000 (18:12 +1100)
committerTim Lunn <tim@feathertop.org>
Tue, 29 Oct 2013 20:44:34 +0000 (07:44 +1100)
with js24 its not possible to access jsapi directly from C code

https://bugzilla.gnome.org/show_bug.cgi?id=711052

src/main.c
src/shell-global.c
src/shell-global.h

index a563c085d4e951f9a3817f6e913af438af0f44b7..c3ff6111e5715c964b479c26e924a2e2329e0be6 100644 (file)
@@ -29,8 +29,6 @@
 #include "shell-perf-log.h"
 #include "st.h"
 
-#include <jsapi.h>
-
 extern GType gnome_shell_plugin_get_type (void);
 
 #define SHELL_DBUS_SERVICE "org.gnome.Shell"
index 04e272464a1883d39ae5b3fb97815c29f9a7a0de..e453df2cd06f4a9a7ec0835a7f8631979411033d 100644 (file)
@@ -22,7 +22,6 @@
 #include <clutter/x11/clutter-x11.h>
 #include <gdk/gdkx.h>
 #include <gio/gio.h>
-#include <gjs/gjs-module.h>
 #include <girepository.h>
 #include <meta/display.h>
 #include <meta/util.h>
@@ -1142,44 +1141,6 @@ shell_global_on_gc (GjsContext   *context,
   global->last_gc_end_time = g_get_monotonic_time ();
 }
 
-/**
- * shell_global_get_memory_info:
- * @global:
- * @meminfo: (out caller-allocates): Output location for memory information
- *
- * Load process-global data about memory usage.
- */
-void
-shell_global_get_memory_info (ShellGlobal        *global,
-                              ShellMemoryInfo    *meminfo)
-{
-  JSContext *context;
-  gint64 now;
-
-#ifdef HAVE_MALLINFO
-  {
-    struct mallinfo info = mallinfo ();
-    meminfo->glibc_uordblks = info.uordblks;
-  }
-#else
-  meminfo->glibc_uordblks = 0;
-#endif
-
-  context = gjs_context_get_native_context (global->js_context);
-
-  meminfo->js_bytes = JS_GetGCParameter (JS_GetRuntime (context), JSGC_BYTES);
-
-  meminfo->gjs_boxed = (unsigned int) gjs_counter_boxed.value;
-  meminfo->gjs_gobject = (unsigned int) gjs_counter_object.value;
-  meminfo->gjs_function = (unsigned int) gjs_counter_function.value;
-  meminfo->gjs_closure = (unsigned int) gjs_counter_closure.value;
-
-  now = g_get_monotonic_time ();
-
-  meminfo->last_gc_seconds_ago = (now - global->last_gc_end_time) / G_TIME_SPAN_SECOND;
-}
-
-
 /**
  * shell_global_notify_error:
  * @global: a #ShellGlobal
index b445c428da0a5027ed1af7add605682cc466015e..ec4a089635ff501ec67c6c480f1c0d12c6185997 100644 (file)
@@ -69,10 +69,6 @@ typedef struct {
   guint  last_gc_seconds_ago;
 } ShellMemoryInfo;
 
-void     shell_global_get_memory_info      (ShellGlobal     *global,
-                                            ShellMemoryInfo *meminfo);
-
-
 /* Run-at-leisure API */
 void shell_global_begin_work     (ShellGlobal          *global);
 void shell_global_end_work       (ShellGlobal          *global);